class CreatePhones < ActiveRecord::Migration
  def self.up
    create_table :phones do |t|
      t.string :phone_number   ,:limit => 30
      t.integer :is_locked ,:limit => 1 ,:default => 0 #是否管理会要锁定 1为True 0为False
      t.timestamps
    end
    
    Phone.create(:phone_number => '13853225231')
    Phone.create(:phone_number => '13573832956')
  end
  
  def self.down
    drop_table :phones
  end
end
